<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "{{%course_count}}".
 *
 * @property int $id
 * @property string $course_id 课程ID
 * @property int $grade 评定等级
 * @property int $studynum 学习人数
 * @property int $hit 点击数
 * @property int $arinum 评论数
 * @property int $created_at 创建时间
 * @property int $updated_at 更新时间
 */
class CourseCount extends \common\models\Base
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%course_count}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['course_id'],'required'],
            [['grade', 'studynum', 'hit', 'arinum', 'created_at', 'updated_at'], 'integer'],
            [['course_id'], 'string', 'max' => 50],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'course_id' => '课程ID',
            'grade' => '评定等级',
            'studynum' => '学习人数',
            'hit' => '点击数',
            'arinum' => '评论数',
            'created_at' => '创建时间',
            'updated_at' => '更新时间',
        ];
    }
}
